using System.Configuration;

namespace Needle.Core.Configuration {
    /// <summary>
    /// The collection of object definitions
    /// </summary>
    public class ObjectElementCollection : NeedleElementCollection {

        /// <summary>
        /// Create a new element.
        /// </summary>
        protected override ConfigurationElement CreateNewElement() {
            return new ObjectElement();
        }

        /// <summary>
        /// gets the key of the property element (the dependency id).
        /// </summary>
        protected override object GetElementKey(ConfigurationElement element) {
            return ((ObjectElement)element).Id;
        }

        /// <summary>
        /// The name of the item xml element.
        /// </summary>
        protected override string ElementName {
            get {
                return "object";
            }
        }

    }
}
